package cn.changeforyou.web.cloud.devUtilApi.controller;

import cn.changeforyou.web.cloud.devUtilApi.common.model.ResultWithEncoded;
import cn.changeforyou.web.cloud.devUtilApi.common.model.StringReqModel;
import cn.changeforyou.web.cloud.devUtilApi.db.sql.fineReport.FineReportSqlScriptUtil;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * @version 1.0
 * @description 帆软控制器
 * @auther zhyu
 * 2022-9-14 18:06
 */
@RestController
@RequestMapping("fineReport")
public class FineReportController {

    @PostMapping("fineReportSqlScript2SqlWithOngl")
    public ResultWithEncoded fineReportSqlScript2SqlWithOngl(@Valid @RequestBody StringReqModel model) {
        String value = model.getValue();
        return ResultWithEncoded.success(FineReportSqlScriptUtil.fineReportSqlScript2SqlWithOngl(value));
    }
}
